public class zuoye9 {
    public static void main(String[] args) {
        String s1 = "hello java";
        String s2 = "hello java";
        if (s1.equals(s2)) {
            String c = s1.replace(" java", "word");
            System.out.println(c);

        }
    }
}
